const { DataTypes } = require("sequelize");
const sequelize = require("./index");

const ShopType = sequelize.define("shop_type", {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        allowNull: false,
        autoIncrement: true,
    },
    name: {
        type: DataTypes.STRING,
        allowNull: false,
    },
    shopId: {
        type: DataTypes.INTEGER,
        allowNull: false,
    },
},{
    timestamps: false
});

ShopType.associate = function ({
    Shop,
                           }) {
    ShopType.belongsTo(Shop)
};

module.exports = ShopType;
